<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{/* 清除默认样式 */
            margin: 0;
            padding: 0;
        }
        html,body{/* 让html和body的宽高占满整个屏幕 */
            width: 100%;
            height: 100%;
        }
        body{
            background-color: pink;
            display: flex;
            flex-direction: row;
            justify-content: center;/* 水平居中 */
            align-items: center;/* 垂直居中 */
        }
       .heart{
            width: 200px;
            height: 200px;
            position: relative;
            background-color: red;
            transform: rotate(45deg);/* 顺时针 旋转45度 */
            animation: heartbit 1s linear infinite alternate;/* 动画名称 动画时间 动画速度 动画次数 动画方向 */
            box-shadow: 0px 10px 30px red ;/* 阴影 */
        }
        .heart::before{/* 添加before伪元素 */
            content: "";
            width: 200px;
            height: 100px;
            background-color: red;
            position: absolute;
            left: 0px;
            top: -99px;
            border-radius: 100px 100px 0 0;
            box-shadow: 0px 0px 30px red ;
        }
        .heart::after{/* 添加after伪元素 */
            content: "";
            width: 100px;
            height: 200px;
            background-color: red;
            position: absolute;
            left: -99px;
            top: 0px;
            border-radius: 100px 0 0 100px;
            box-shadow: 0px 0px 30px red ;
        }
        /*实现动画*/
        @keyframes heartbit{
            0%{
                transform: rotate(44deg) scale(0.6);/* 旋转45度，缩小0.6倍 */

            }
            
            100%{
                transform: rotate(44deg) scale(1);/* 放大1倍 */
            }
        }
    </style>
</head>
<body>
    <div class="heart"></div>
</body>
</html>